package com.bawei.library_base;

import com.bawei.library_base.entity.RegLogUser;
import com.bawei.library_base.entity.User;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;

/**
 * @author : zhiyu
 * @date : 2021/12/21
 * @content :
 */
public interface Api {

    //注册
    @Headers(TokenPath.Toke.TOKE)
    @POST("api/User/register")
    Observable<User> reg(@Body RegLogUser regUser);


    //登录
    @Headers(TokenPath.Toke.TOKE)
    @POST("api/User/login")
    Observable<User> log(@Body RegLogUser regUser);

    //注册随机数
    @Headers(TokenPath.Toke.TOKE)
    @GET("api/WeekTest/getAuthCode?phonenumber={1111}")
    Observable<String> phone();

}
